package cn.cocho.android.mct.comp.button;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import cn.cocho.android.mct.R;
import cn.cocho.android.mc.activity.BaseActivity;

public class McButtonTest extends BaseActivity {

	@Override
	public void init() {
		setContentView(R.layout.mc_button);

		Button btn_enabled = (Button) findViewById(R.id.btn_enabled);
		btn_enabled.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Button compBtn = (Button) findViewById(R.id.compBtn);
				compBtn.setEnabled(true);
			}
		});

		Button btn_disnabled = (Button) findViewById(R.id.btn_disnabled);
		btn_disnabled.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Button compBtn = (Button) findViewById(R.id.compBtn);
				compBtn.setEnabled(false);
			}
		});
	}

}
